<%@ page pageEncoding="UTF-8"%>
<%@ include file="../common/head.jsp"%>
    <link href="${ctx}/assets/static/BJUI/themes/css/bootstrap.min.css" rel="stylesheet">
    <!-- core - css -->
    <link href="${ctx}/assets/static/BJUI/themes/css/style.css" rel="stylesheet">
    <link href="${ctx}/assets/static/BJUI/themes/blue/core.css" id="bjui-link-theme" rel="stylesheet">
    <!-- plug - css -->
    <link href="${ctx}/assets/static/BJUI/plugins/kindeditor/themes/default/default.css" rel="stylesheet">
    <link href="${ctx}/assets/static/BJUI/plugins/colorpicker/css/bootstrap-colorpicker.min.css" rel="stylesheet">
    <link href="${ctx}/assets/static/BJUI/plugins/niceValidator/jquery.validator.css" rel="stylesheet">
    <link href="${ctx}/assets/static/BJUI/plugins/bootstrapSelect/bootstrap-select.css" rel="stylesheet">
    <link href="${ctx}/assets/static/BJUI/themes/css/FA/css/font-awesome.min.css" rel="stylesheet">
    <link href="${ctx}/assets/css/bjui-x.css?v=0.13" rel="stylesheet">
    <!--[if lte IE 9]>
    <script src="${ctx}/assets/js/html5shiv.min.js"></script>
    <script src="${ctx}/assets/js/respond.min.js"></script>
    <![endif]-->
    <!-- jquery -->

    <script src="${ctx}/assets/js/jquery-1.12.4.min.js"></script>
    <script src="${ctx}/assets/static/BJUI/js/jquery.cookie.js"></script>
    <!--[if lte IE 9]>
    <script src="${ctx}/assets/static/BJUI/other/jquery.iframe-transport.js"></script>
    <![endif]-->
    <!-- BJUI.all 分模块压缩版 -->
    <script src="${ctx}/assets/static/BJUI/js/bjui-all.min.js"></script>
    <!-- plugins -->
    <!-- swfupload for uploadify && kindeditor -->
    <script src="${ctx}/assets/static/BJUI/plugins/swfupload/swfupload.js"></script>
    <!-- kindeditor -->
    <script src="${ctx}/assets/static/BJUI/plugins/kindeditor/kindeditor-all-min.js"></script>
    <!-- colorpicker -->
    <script src="${ctx}/assets/static/BJUI/plugins/colorpicker/js/bootstrap-colorpicker.min.js"></script>
    <!-- ztree -->
    <script src="${ctx}/assets/static/BJUI/plugins/ztree/jquery.ztree.all-3.5.js"></script>
    <!-- nice validate -->
    <script src="${ctx}/assets/static/BJUI/plugins/niceValidator/jquery.validator.min.js?local=zh-CN"></script>
    <script src="${ctx}/assets/static/BJUI/plugins/niceValidator/jquery.validator.themes.js"></script>
    <!-- bootstrap plugins -->
    <script src="${ctx}/assets/static/BJUI/plugins/bootstrap.min.js"></script>
    <script src="${ctx}/assets/static/BJUI/plugins/bootstrapSelect/bootstrap-select.min.js"></script>
    <script src="${ctx}/assets/static/BJUI/plugins/bootstrapSelect/defaults-zh_CN.min.js"></script>
    <!-- icheck -->
    <script src="${ctx}/assets/static/BJUI/plugins/icheck/icheck.min.js"></script>
    <!-- dragsort -->
    <script src="${ctx}/assets/static/BJUI/plugins/dragsort/jquery.dragsort-0.5.1.min.js"></script>
    <!-- ECharts -->
    <script src="${ctx}/assets/static/echarts/echarts.min.js"></script>
    <!-- other plugins -->
    <script src="${ctx}/assets/static/BJUI/plugins/other/jquery.autosize.js"></script>
    <link href="${ctx}/assets/static/BJUI/plugins/uploadify/css/uploadify.css" rel="stylesheet">
    <script src="${ctx}/assets/static/BJUI/plugins/uploadify/scripts/jquery.uploadify.min.js"></script>
    <script src="${ctx}/assets/static/BJUI/plugins/download/jquery.fileDownload.js"></script>
    <script src="${ctx}/assets/static/BJUI/plugins/highcharts/highcharts.js"></script>
    <script src="${ctx}/assets/static/BJUI/plugins/highcharts/exporting.js"></script>
	<script src="${ctx}/assets/static/BJUI/plugins/highcharts/highcharts-3d.js"></script>

    <script type="text/javascript" src="${ctx}/assets/js/bjui-x.js"></script>

    <!-- init -->
    <script type="text/javascript">
        $(function() {
            BJUI.init({
                JSPATH       : '${ctx}/assets/static/BJUI/',         //[可选]框架路径
                PLUGINPATH   : '${ctx}/assets/static/BJUI/plugins/', //[可选]插件路径
                loginInfo    : {url:"${ctx}/login.jsp", title:'登录', width:530, height:266}, // 会话超时后弹出登录对话框
                statusCode   : {ok:200, error:300, timeout:301 ,warn : 302, redirect : 307}, //[可选]
                ajaxTimeout  : 50000, //[可选]全局Ajax请求超时时间(毫秒)
                pageInfo     : {total:'total', pageCurrent:'pageCurrent', pageSize:'pageSize', orderField:'orderField', orderDirection:'orderDirection'}, //[可选]分页参数
                alertMsg     : {displayPosition:'topcenter', displayMode:'slide', alertTimeout:3000}, //[可选]信息提示的显示位置，显隐方式，及[info/correct]方式时自动关闭延时(毫秒)
                keys         : {statusCode:'statusCode', message:'message'}, //[可选]
                ui           : {
                    windowWidth      : 0,    //框架可视宽度，0=100%宽，> 600为则居中显示
                    showSlidebar     : true, //[可选]左侧导航栏锁定/隐藏
                    clientPaging     : true, //[可选]是否在客户端响应分页及排序参数
                    overwriteHomeTab : false, //[可选]当打开一个未定义id的navtab时，是否可以覆盖主navtab(我的主页)
                    hideWidth : 600 //拓展项，小屏适配宽度，默认600，影响左侧菜单等
                },
                debug        : false,    // [可选]调试模式 [true|false，默认false]
                theme        : 'sky' // 若有Cookie['bjui_theme'],优先选择Cookie['bjui_theme']。皮肤[五种皮肤:default, orange, purple, blue, red, green]
            })

            // main - menu
            $(document).on('click', '#bjui-accordionmenu a', function(e) {
                e.preventDefault();
                var $a = $(this), $li = $a.parent(),$a_href = $a.attr('href');
                if($li.hasClass('menu-items-tree')){
                    $li.toggleClass('open').find('ul.menu-items').slideToggle();
                    var $open = $li.siblings('.menu-items-tree');
                    if($open.hasClass('open')){
                        $open.removeClass('open').find('ul.menu-items').slideUp();
                    }
                    return
                }
                if($a_href == '' || $a_href == '#' || $a_href == 'javascript:;') return
                var options = $a.data('options').toObj()
                //自定义page页面标签名
                if($li.parent().hasClass('menu-items')){
                    var $p_title = $li.parent().prevAll('a').first().html()
                }
                var onClose = function() {
                    $li.removeClass('active')
                }
                var onSwitch = function() {
                    $('#bjui-accordionmenu').find('ul > li').removeClass('switch')
                    $li.addClass('switch')
                }
                $li.addClass('active')

                if (options) {
                    options.p_title = $p_title
                    options.url      = $a.attr('href')
                    options.onClose  = onClose
                    options.onSwitch = onSwitch
                    if (!options.title) options.title = $a.text()

                    if (!options.target)
                        $a.navtab(options)
                    else
                        $a.dialog(options)
                    if($('#menu_lock').hasClass('sm-collapse')){
                        $(this).slidebar('unlock')
                    }
                }

                e.preventDefault()
            })

        })
        //注：此处对点击主页tab进行了修改，修改内容为bjui-navtab.js 第54行，增加了点击刷新
        //切换并刷新主面板
        function refresh_mainTab(obj){
            $(obj).navtab('switchTab', 'main').navtab('refresh','main');
            if($('#menu_lock').hasClass('sm-collapse')){
                $(this).slidebar('unlock')
            }
        }

    </script>


    <link type="text/css" rel="stylesheet" href="${ctx}/assets/static/syntaxhighlighter/syntaxhighlighter-2.1.382/styles/shCore.css"/>
    <link type="text/css" rel="stylesheet" href="${ctx}/assets/static/syntaxhighlighter/syntaxhighlighter-2.1.382/styles/shThemeEclipse.css"/>
    <script type="text/javascript" src="${ctx}/assets/static/syntaxhighlighter/syntaxhighlighter-2.1.382/scripts/brush.js"></script>
    <script type="text/javascript">
        $(function(){
            SyntaxHighlighter.config.clipboardSwf = '${ctx}/assets/static/syntaxhighlighter/syntaxhighlighter-2.1.382/scripts/clipboard.swf'
            $(document).on(BJUI.eventType.initUI, function(e) {
                SyntaxHighlighter.highlight();
            })
        })
    </script>